/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.entities;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author NguyenVan
 */
@Entity
public class EventLibrary implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "EventId")
    private Integer eventId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "Name")
    private String name;

    public EventLibrary(Integer eventId, String name, String description, String eventType, String timeStart, String timeEnd) {
        this.eventId = eventId;
        this.name = name;
        this.description = description;
        this.eventType = eventType;
        this.timeStart = timeStart;
        this.timeEnd = timeEnd;
    }
    @Size(max = 1000)
    @Column(name = "Description")
    private String description;
    @Size(max = 100)
    @Column(name = "EventType")
    private String eventType;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TimeStart")
    @Temporal(TemporalType.TIMESTAMP)
    private String timeStart;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TimeEnd")
    @Temporal(TemporalType.TIMESTAMP)
    private String timeEnd;
    @NotNull
    public EventLibrary() {
    }

    public EventLibrary(Integer eventId) {
        this.eventId = eventId;
    }

    public EventLibrary(Integer eventId, String name, String timeStart, String timeEnd) {
        this.eventId = eventId;
        this.name = name;
        this.timeStart = timeStart;
        this.timeEnd = timeEnd;
    }

    public Integer getEventId() {
        return eventId;
    }

    public void setEventId(Integer eventId) {
        this.eventId = eventId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getTimeStart() {
        return timeStart;
    }

    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    
}
